package com.czkt.controller;

import com.czkt.pojo.SysUser;
import com.czkt.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class UserController {

    @Autowired
    UserService userService;

    //添加页面
    public Object toAdd(){
        return "add";
    }




    @RequestMapping("/save")
    @ResponseBody
    public Object save(SysUser sysUser){
        return userService.insert(sysUser);
    }
}
